package com.cl.master.service.impl;

import com.cl.master.domain.SewageStandard;
import com.cl.master.domain.WaterQuality;
import com.cl.master.mapper.WaterQualityMapper;
import com.cl.master.service.waterQualityService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * @Author xc
 * @Date 2023/4/29 15:10
 * @Version 1.0
 */
@Service
public class waterQualityServiceImpl implements waterQualityService {

    @Resource
    private WaterQualityMapper waterQualityMapper;

    @Override
    public Map<String, Object> getDataByMid(int mid) {
        Map<String, Object> data = waterQualityMapper.getDataByMid(mid);
        return data;
    }

    @Override
    public Map<String, Object> getCount() {
        Map<String,Object> data = waterQualityMapper.getCount();
        return data;
    }

    @Override
    public Map<String, Object> getStatusBy() {
        Map<String,Object> data = waterQualityMapper.getStatusBy();
        return data;
    }

    @Override
    public Map<String, Object> getStandardBy()
    {
        Map<String,Object> data = waterQualityMapper.getStandardBy();
        return data;
    }

    @Override
    public Map<String, Object> getPHBy() {
        Map<String,Object> data = waterQualityMapper.getPHBy();
        return data;
    }

    //获取正常达标数据
    @Override
    public Map<String,Object> getNormalBy(){
        Map<String,Object> data = waterQualityMapper.getNormalBy();
        return data;
    }


    @Override
    public List<Map<String, Object>> getDissolvedOxygenAndTurbidity() {
        List<Map<String,Object>> data = waterQualityMapper.getDissolvedOxygenAndTurbidity();
        return data;
    }

    @Override
    public Map<String, Object> getCityAndWatershedBy() {

        Map<String,Object> data = waterQualityMapper.getCityAndWatershedBy();
        return data;
    }

    @Override
    public List<Map<String, Object>> getProvinceCityCount() {
        List<Map<String,Object>> data = waterQualityMapper.getProvinceCityCount();
        return data;
    }

    @Override
    public List<Map<String, Object>> getWatershedCount() {
        List<Map<String,Object>> data = waterQualityMapper.getWatershedCount();
        return data;
    }

    @Override
    public List<Map<String, Object>> getWaterQualityData() {
        List<Map<String,Object>> data = waterQualityMapper.getWaterQualityData();
        return data;
    }

    @Override
    public List<Map<String, Object>> getPhosphorusData() {
        List<Map<String,Object>> data = waterQualityMapper.getPhosphorusData();
        return data;
    }


    // @Override
    // public Collection<WaterQuality> getAllInfo(int startPage) {
    //     Collection<WaterQuality> allInfo = waterQualityMapper.getAllInfo(startPage);
    //     System.out.println("所有企业的排污信息已全部查询完毕");
    //     return allInfo;
    // }

    //数据页面查询
    @Override
    public List<Map<String, Object>> getAllWaterInfo() {
        List<Map<String,Object>> data = waterQualityMapper.getAllWaterInfo();
        return data;
    }

    @Override
    public void deleteWaterInfo(Long id) {
        waterQualityMapper.deleteWaterInfo(id);
    }
}
